package com.okaysoft.ofb.account

class Requestmap {

    String name
    String url
    String link
    String configAttribute
    boolean menuEnabled
    Integer orderNumber = 0
    Long parentId

    static mapping = {
        cache true
    }

    static constraints = {
        parentId  nullable: true
        name nullable: false
        url blank: false, unique: true
        configAttribute blank: false
    }

    def getParentName() {
        Requestmap.get(parentId)?.name
    }
}
